﻿using System;
using System.Collections.Generic;
using YJKArchUtils.Utils;
using YJKRevitDimensionText.OneKeyPlanDim.LevelDim.Data;

namespace YJKRevitDimensionText.OneKeyPlanDim.LevelDim
{
	public class CommonLayerFloorComparer : IComparer<CommonLayerFloor>
	{
		public int Compare(CommonLayerFloor CommonLayerFloor1, CommonLayerFloor CommonLayerFloor2)
		{
			try
			{
				if (Geometry.LessThan(CommonLayerFloor1.dLevelVal, CommonLayerFloor2.dLevelVal))
				{
					return 1;
				}
				if (Geometry.IsEqual(CommonLayerFloor1.dLevelVal, CommonLayerFloor2.dLevelVal))
				{
					return 0;
				}
				return -1;
			}
			catch
			{
			}
			return 0;
		}
	}
}
